interface ISing {
  voice: string
  sing(): string
}
interface IJump {
  height: number
  jump(): void
}

class Person {
  name = '张三'
  age = 12
  say(): boolean {
    console.log(this.name + this.age);
    return true
  }
  constructor(name: string, age: number) {
    this.name = name
    this.age = age
  }

}

let p: Person = new Person('李四', 45)
console.log(p);
class Farther {
  private name = 'lisi'
  run() {
    console.log(111111);
  }
  constructor(v1: string) {
    this.name = v1
  }
}
class Son extends Farther {
  age = 11
  constructor(name: string, age: number) {
    super(name)
    this.age = age
  }
}
let son = new Son('小明', 18)
console.log(son);
son.run()

class Person2 extends Farther implements IJump, ISing {
  voice = '男高音'
  sing() {
    console.log('唱歌');
    return '唱歌'
  }
  height = 140
  jump(): void {
    console.log('跳');
  }
  constructor(voice: string, height: number, name: string) {
    super(name)
    this.voice = voice
    this.height = height
  }
}
let person2 = new Person2('女低音', 100, '小红')
console.log(person2);
